/**
 * com.sunrise.commons.utils.ModelVo.java
 */
package com.mbmed.doctor.commons.utils;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

 /**
 * @file  ModelVo.java
 * @author 贾海勇
 * @version 0.1
 * @todo	TODO 用户出来jquery easyUi接受返回的json字符串格式，total为总记录条数，rows为返回的结果列表
 * Copyright(C), 2013-2014
 *			Shenzhen Coordinates Software Development Co., Ltd
 */
@SuppressWarnings("rawtypes")
public class ModelVo implements Serializable {

	private static final long serialVersionUID = 8751640614272021177L;
	
	private String result;
	private String resultMsg;
	private int total = 0;
	private List rows = null;
	
	private List<?> list;
	private Map<String,Object> map;
	private Map TableField;
	
	
	public int getTotal() {
		return total;
	}
	public void setTotal(int total) {
		this.total = total;
	}
	public List getRows() {
		return rows;
	}
	public void setRows(List rows) {
		this.rows = rows;
	}
	public String getResult() {
		return result;
	}
	public void setResult(String result) {
		this.result = result;
	}
	public String getResultMsg() {
		return resultMsg;
	}
	public void setResultMsg(String resultMsg) {
		this.resultMsg = resultMsg;
	}
	
	public List<?> getList() {
		return list;
	}
	public void setList(List<?> list) {
		this.list = list;
	}
	
	public Map getTableField() {
		return TableField;
	}
	public void setTableField(Map tableField) {
		TableField = tableField;
	}
	public Map<String, Object> getMap() {
		return map;
	}
	public void setMap(Map<String, Object> map) {
		this.map = map;
	}
	
	public ModelVo(){
		list = new ArrayList();
	}
	
	public ModelVo(String result){
		this.result = result;
		list = new ArrayList();
	}
	
	public ModelVo(String result,String resultMsg){
		this.result = result;
		this.resultMsg = resultMsg;
		list = new ArrayList();
	}
	
	
	public void setlsFromMap(Map<String, Object> map) {
		List ls = new ArrayList<>();
		ls.add(map);
		setList(ls);
	}
}
